package Android.Billarm;

import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainScreen extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        /* Billarm.resetAlarm (this); */
    }

    public void newClicked (View v)
    {
        Intent newBill = new Intent (v.getContext(), BillScreen.class);
        newBill.putExtra ("bill", new Bill ());
        startActivity (newBill);
    }

    public void calClicked (View v)
    {
        int mode;
        switch (v.getId ())
        {
            case R.id.mainPendingButton:
                mode = CalendarScreen.SHOW_ACTIVE_BILLS;
                break;
            case R.id.mainInactiveButton:
                mode = CalendarScreen.SHOW_INACTIVE_BILLS;
                break;
            case R.id.mainScheduleButton:
            default:
                mode = CalendarScreen.SHOW_ALL_BILLS;
                break;
        }
        Intent cal = new Intent (v.getContext(), CalendarScreen.class);
        cal.putExtra ("show", mode);
        startActivity (cal);
    }

    public void quitClicked (View v) { MainScreen.this.finish (); }
}

